package ch1;

import java.util.*;

public class ListTest2 {

	public static void main(String[] args) {
		// List中加入复杂对象
		List l = new ArrayList();
		l.add("dog");
		l.add(new Person("老吴", 44, "男"));
		l.add(new Person("刘四", 33, "男"));
		l.add(new Person("老张", 24, "女"));
		l.add(new Person("小王", 14, "男"));
		System.out.println(l);
		Person p = new Person("刘四", 33, "女");

		System.out.println(l.contains(p));
	}

}
